package com.wanke.client;

import com.wanke.domain.po.Measurement;
import feign.Body;
import feign.Headers;
import feign.Param;
import feign.RequestLine;
import io.vertx.core.Future;

import java.util.List;
import java.util.Map;

@Headers({ "Accept: application/json" })
public interface MeasureClient  {

    @RequestLine("POST /measurement/realtime")
    @Headers({ "Accept: application/json","access-token: {access-token}" })
    @Body("{body}")
    public Future<Map<String,Object>> loadMeasure(@Param("access-token")String token, @Param("body") List<Measurement> measurementList);

    @RequestLine("POST /heartbeat")
    @Headers({ "Accept: application/json","access-token: {access-token}" })
    @Body("{body}")
    public Future<Map<String,Object>> updateHeartbeat(@Param("access-token")String token,@Param("pointNumber")Long pointNumber);

    @RequestLine("POST /measurement/recollect")
    @Headers({ "Accept: application/json","access-token: {access-token}" })
    @Body("{body}")
    public Future<Map<String,Object>> recollect(@Param("access-token")String token, @Param("body") List<Measurement> measurementList);
}
